<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/3/7
  Time: 15:03
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@include file="../../../base.jsp" %>
<div class="cover" id="editOptionWindow">
    <div class="modal-dialog floatage">
        <div class="modal-content" id="floadtageCentent">
            <div class="text-center">
                <div class="modal-header">
                    <button type="button" class="close" onclick="editOption.close()">x</button>
                    <h4 class="text-center text-primary">
                        答案选项
                    </h4>
                </div>
                <br>
                <%--<c:if test="${!empty paperId}">hidden</c:if>--%>
                <form id="editOptionForm" class="form-horizontal text-center">
                    <input class="hidden" value="${option.optionId}" name="questionOption.optionId">
                    <input class="hidden" value="${option.questionId}" name="questionOption.questionId">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">选项内容</label>
                        <div class="col-sm-8">
                    <textarea id="paperDescr" class="form-control" rows="3" name="questionOption.content"
                              placeholder="">${option.content}</textarea>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">结果描述</label>
                        <div class="col-sm-8">
                    <textarea class="form-control" rows="3" name="questionOption.analysis"
                              placeholder="tips">${option.analysis}</textarea>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">得分</label>
                        <div class="col-sm-8">
                            <input type="number" class="form-control" name="questionOption.score" placeholder=""
                                   value="${option.score}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">排序号</label>
                        <div class="col-sm-8">
                            <input type="number" class="form-control" name="questionOption.rank" placeholder="排序号"
                                   value="${option.rank}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">状态</label>
                        <div class="col-sm-8">
                            <select class="form-control" name="questionOption.status">
                                <option value="0" <c:if test="${option.status == 0}"> selected</c:if> >默认（未发布）</option>
                                <option value="50" <c:if test="${option.status == 50}"> selected</c:if> >发布</option>
                                <option value="99" <c:if test="${option.status == 99}"> selected</c:if> >废除</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">操作</label>
                        <div class="col-sm-8">
                            <button type="button" class="btn btn-danger " onclick="editOption.save()">
                                <%--<c:if test="${empty paperId}">下一步</c:if>--%>
                                <%--<c:if test="${!empty paperId}">提交修改</c:if>--%>
                                提交
                            </button>
                        </div>
                    </div>
                </form>


            </div>
        </div>
    </div>
</div>
<script src="${basePath}js/paper_js/editOption.js"></script>